#!/bin/bash

BACK_MNT="/run/media/lancerx/ST_EXT4"

mount | grep "$BACK_MNT"
if [ ! $? -eq 0 ]
then
	echo "Backup destination '$BACK_MNT' not mounted"
	exit 1
fi

echo "Successfully detected backup destination '$BACK_MNT'"

function rsync_run
{
	echo "This is rsync for $BACK_SRC to $BACK_DST"
	rsync -rltDvu --progress --delete ${BACK_SRC} ${BACK_DST}
}

BACK_SRC="/home/Arch_Data/Media/Musics"
BACK_DST="${BACK_MNT}/Backup"
rsync_run

